<?php
use backend\assets\AgentAsset;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;

AgentAsset::register($this);
$this->registerJsFile("@web/system/financial/cashier/add.js",['position'=>$this::POS_END]);
?>
<style>
	.addUser {padding: 20px 136px;}
	.addUser .addUser-list{margin-bottom: 30px;}
	.addUser .name{margin-right: 20px;}
	.addUser input[type="text"]{width: 256px;height:34px;}
	.addUser .ok,.addUser .rest{background-color: #fe7b9d;color: #fff;border-radius: 5px;padding: 5px 31px;}
	.addUser .rest{background-color: #a4a9ad;}
</style>
<div class="addUser mt30">
	<div class="hide"><iframe name='send_post' id='send_post'></iframe></div>
	<?php ActiveForm::begin(['options'=>['target'=>'send_post'],'options'=>['name'=>'register'],'action'=>Url::toRoute(['financial/cashier','action'=>'adduser'])])?>
	  <div class="addUser-list">
	    <label class="name" for="name">姓名</label>
	    <input type="text" class="" data-rule="required;length[~5]" name="name" id="name" >
	  </div>
	  <div class="addUser-list">
	    <label class="name" for="mobile">手机</label>
	    <input type="text" class="" data-rule="mobile" id="mobile" name="mobile">
	  </div>
	  <div class="text-center">
		   <span class="btnBg" style="width: 92px; height: 32px;line-height: 32px;">
			  <input type="submit" value="确定" style="display: inline-block; width: 100%; background: 0; border: 0 ;padding: 0" /></span>
		  <span class="btnBg bg_rest ml20" style="width: 92px; height: 32px;line-height: 32px;">
			 <input type="reset" value="取消"  class="rest" style="display: inline-block; width: 100%; background: 0; border: 0;padding: 0"/></span>
	  </div>
	<?php ActiveForm::end()?>
</div>

<?php $this->beginBlock('js_index_end') ?>
	$('form[name="register"]').validator({
	focusCleanup: true,
	stopOnError:false,
	//debug: true,
	timely: 2,
	msgClass: "n-bottom myclass",
	});
	$(function(){
	var index = parent.layer.getFrameIndex(window.name);
	parent.layer.iframeAuto(index);
	$('input[type="reset"]').click(function(){
	parent.layer.close(index);
	})
	})
<?php $this->endBlock() ?>
<?php $this->registerJs($this->blocks['js_index_end'], $this::POS_END); ?>